<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<header th:replace="base/top9"></header><div class="box-width">
    <div class="box-mar-top20 clearfix">
        <div class="pull-left con01_left">
            <div class="html-details">
                <div class="html-details-title">
                    <h2 th:text="${induInfo.informationTitleLong}">标题</h2>
                    <span th:text="'来源：'+${induInfo.articleSource}">来源：</span>
                    <span th:utext="'<i class=iconfont>&#xe617;</i>'+${induInfo.informationHits}"><i class="iconfont">&#xe617;</i></span>
                    <span class="icon-active" th:data-value="${induInfo.id}"><i class="iconfont">&#xe603;</i><em th:text="${induInfo.informationLike}">5</em></span>
                    <!--                     <span><i onclick="getupdateCollectNum('${induInfo.uuid}')" class="iconfont">&#xe613;</i>${induInfo.collectNum}</span>-->
                    <span th:text="${#dates.format(induInfo.createTime,'MM-dd')}">发布时间</span>

                </div>
                <div class="html-details-contentr">

                    <div class="html-details-contentr-text">
                        <p id="message"></p>

                    </div>
                </div>
            </div>
        </div>

       <!--引入右边图片-->
        <div th:replace="base/commom::home_right"></div>
    </div>
</div>

<!--引入home的底部-->
<div th:replace="base/commom::home_foot"></div>
</body>

<!--引入公共js-->
<div th:replace="base/commom::common_js"></div>
<script th:inline="javascript">

    var mes = [[${message}]]
    //解码url
    $("#message").html(decodeURI(mes));

    $(function () {
        $.ajax({
            url: 'https://api.map.baidu.com/location/ip?ak=UUSbLbC8EGKlYZELPuSK4hZWOSKeLgGG',
            type: 'POST',
            dataType: 'jsonp',
            success: function (data) {
                $('#citys').html(data.content.address_detail.city)
            }
        });

        $(".icon-active").click(function () {
            var $that = $(this);
            var id = $(this).attr("data-value");
            if ($(this).hasClass("icon-active-active")) {
                $.ajax({
                    url: "../industryInfo/updatecoolNum?id=" + id+"&number="+1,
                    type: "POST",
                    dataType: "json",
                    success: function (data) {
                        if(data.code == "200"){
                            var num = Number($that.children("em").text()) - 1;
                            $that.children("em").html(num);
                        }

                    }

                });
                $(this).removeClass("icon-active-active");

            } else {
                $.ajax({
                    url: "../industryInfo/updatecoolNum?id=" + id+"&number="+0,
                    type: "POST",
                    dataType: "json",
                    success: function (data) {
                        if (data.code == "200") {
                            var num = Number($that.children("em").text()) + 1;
                            $that.children("em").html(num);
                        }

                    }

                })
                $(this).addClass("icon-active-active");
            }
        });

    })

    //企业工作台
    function registerUser() {
        window.location.href="../enterprise/person";
    }

</script>


</html>